﻿using System;
using System.Data;
using Team4Mock.DAO;
namespace Team4Mock.Entity
{
    public class TrustRegionEntity
    {
        TrustRegionDAO td = new TrustRegionDAO();
        private string _trusRegionID;
        private string _trusRegionName;
        private string _description;
        private string _countryId;
        private int _isActive;
        private int _regionid;
        public int RegionID { get; set; }

        public string Key { get; set; }

        public TrustRegionEntity()
        { }
        public TrustRegionEntity(string trusRegionName, string description, string countryID, int isActive)
        {
            this._trusRegionName = trusRegionName;
            this._description = description;
            this._countryId = countryID;
            this._isActive = isActive;
        }

        public string TrusRegionName { get; set; }

        public string Description { get; set; }

        public string CountryID { get; set; }
        public int TrusRegionID { get; set; }

        public int IsActive { get; set; }

        public DataTable Getdata()
        {
            return td.Getdata();
        }
        public DataTable GetdataByID(TrustRegionEntity e)
        {
            return td.GetdataByID(e.RegionID);
        }
        public DataTable GetdataTrue()
        {
            return td.GetDataTrue();
        }
        public DataTable GetDisTrict(TrustRegionEntity w)
        {
            return td.GetDistrictById(w.RegionID);
        }

        public DataTable Search(TrustRegionEntity t)
        {
            return td.Search(t.Key);
        }
        public void Insert(TrustRegionEntity e)
        {
            td.Insert(e.TrusRegionName,e.Description,e.CountryID,e.IsActive);
        }
        public void Update(TrustRegionEntity e)
        {
            td.Update(e.TrusRegionName, e.Description, e.CountryID, e.IsActive,e.TrusRegionID);
        }
    }
}